<template>
  <div class="demo">
    <h2>学校名称：{{ name }}</h2>
    <h2>学校地址：{{ schoolAddr }}</h2>
    <button @click="showInfo">点我提示学校名</button>
  </div>
</template>

<script>
export default {
  name:'School',
  data() {
    return {
      name: "白兰小学",
      schoolAddr: "五台县陈家庄乡",
    };
  },
  methods: {
    showInfo() {
      alert("学校名：" + this.schoolName);
    },
  },
}
</script>

<style>
.demo{
  background-color: orange;
}
</style>